import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/qa_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class QaListEntity {
	late int code;
	late String msg;
	late List<QaListData> data;

	QaListEntity();

	factory QaListEntity.fromJson(Map<String, dynamic> json) => $QaListEntityFromJson(json);

	Map<String, dynamic> toJson() => $QaListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class QaListData {
	late int id;
	late String title;
	late String content;
	@JSONField(name: "sort_id")
	late int sortId;
	late String platform;

	QaListData();

	factory QaListData.fromJson(Map<String, dynamic> json) => $QaListDataFromJson(json);

	Map<String, dynamic> toJson() => $QaListDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}